﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using HotelManagement._04.OBJECT;
using HotelManagement._03.DAO;

namespace HotelManagement._02.BUS
{
    class RoleBUS
    {
        RoleDAO m_RoleDAO = new RoleDAO();
        public DataTable ViewRole()
        {
            return m_RoleDAO.ViewRole("pr_tblRole_SelectAll");
        }
        public bool AddRole(Role ip_Role)
        {
            return m_RoleDAO.AddRole(ip_Role, "pr_tblRole_Insert");
        }
        public bool UpdateRole(Role ip_Role)
        {
            return m_RoleDAO.UpdateRole(ip_Role, "pr_tblRole_Update");
        }
        public bool DeleteRole(Role ip_Role)
        {
            return m_RoleDAO.DeleteRole(ip_Role, "pr_tblRole_DeleteRow");
        }
        public DataTable SearchRole(string ip_KeyWord)
        {
            return m_RoleDAO.SearchRole(ip_KeyWord, "pr_tblRole_Search");
        }
    }
}
